﻿#ifndef ROUTE_H
#define ROUTE_H

#include <QGeoCoordinate>
#include <QList>
#include <QDataStream>

struct Route
{
    QString name;
    QList<QGeoCoordinate> wpts;
    qint64 createdTimestamp;
    bool visible;
};

inline QDataStream &operator<<(QDataStream &stream, const Route &r)
{
    return stream << r.name
                  << r.wpts
                  << r.createdTimestamp
                  << r.visible;
}

inline QDataStream &operator>>(QDataStream &stream, Route &r)
{
    return stream >> r.name
                  >> r.wpts
                  >> r.createdTimestamp
                  >> r.visible;
}

#endif // ROUTE_H
